package zuoye5;

public class Market {
    private String marketName;
    private Product[] productsArr;
    public String getMarketName(){
        return marketName;
    }
    public void setMarketName(String marketName){
        this.marketName=marketName;
    }

    public Product[] getProductsArr() {
        return productsArr;
    }
    public void setProductsArr(Product[] productsArr){
        this.productsArr=productsArr;
    }
    Product sell(String name){
        for(int i=0;i<productsArr.length;i++){
            if(productsArr[i].getProName()==name){
                return productsArr[i];
            }
        }
        return null;
    }
}
